#ifndef __GPUProcessingTesting__OpenCLProcessor__
#define __GPUProcessingTesting__OpenCLProcessor__

#include <OpenCL/opencl.h>
#include <sys/stat.h>

#include "OpenCLProcessorBase.h"
#include <vector>

class OpenCLTestingProcessor: public OpenCLProcessorBase {
public:
    OpenCLTestingProcessor();
    ~OpenCLTestingProcessor();
    
    /*
        Creates buffers on GPU and sets initial values for 1;
        sets buffers as kernel arguments;
     */
    void setBuffers(unsigned int size);
    /*
        Data is copied into GPU buffer, by that function you set
        values;
     */
    void setDataValue(float value);
    
    //Transfer testing
    void transferDataToGPU();
    void executeTheSimplestKernel();
    void transferDataFromGPU(float* destiny);
    void executeCommands() {
        clFlush(cmdQueue_);
        clFinish(cmdQueue_);
    }
     
private:
    
    cl_kernel inOutKernel_;
    void createKernels();
    
    float* data_ = NULL;
    
    unsigned int buffersLength_;
    cl_mem inBuffer_, outBuffer_;
};



#endif /* defined(__GPUProcessingTesting__OpenCLProcessor__) */
